package renxian;

import org.junit.Before;
import org.junit.Test;
import renxian.Spider;

import static org.junit.Assert.*;

public class SpiderTest {
    private Spider spider;

    @Before
    public void setUp() {
        spider = new Spider();
    }

    @Test
    public void testNewGameInitializesCards() {
        spider.newGame();
        assertEquals(104, spider.getC());
    }

    @Test
    public void testSetGrade() {
        spider.setGrade(Spider.EASY);
        assertEquals(Spider.EASY, spider.getGrade());
        
        spider.setGrade(Spider.NATURAL);
        assertEquals(Spider.NATURAL, spider.getGrade());
        
        spider.setGrade(Spider.HARD);
        assertEquals(Spider.HARD, spider.getGrade());
    }

    @Test
    public void testDealReducesDeck() {
        int initialCount = spider.getC();
        spider.deal();
        assertTrue(spider.getC() > initialCount);
    }
} 